#pragma once
#include <map>
class Graphic;


class GraphicFactory
{
private:
	GraphicFactory(void);
	~GraphicFactory(void);
public:
	typedef Graphic* (*CreateCallBack) (void);

	static void RegistGraphic(void);
	static Graphic* CreateGraphic(int type);
private:
	static std::map<int, CreateCallBack> __CreateFucMap;
};

#define DEF_CREATE_CALLBACK(x) \
	static Graphic* CreateGraphic(void) { return new x ; }